
package com.cmc.service.impl;

import java.util.List;

import com.cmc.service.impl.BaseManager;
import com.cmc.model.System;
import com.cmc.dao.SystemDao;
import com.cmc.service.SystemManager;

public class SystemManagerImpl extends BaseManager implements SystemManager {
    private SystemDao dao;

    /**
     * Set the Dao for communication with the data layer.
     * @param dao
     */
    public void setSystemDao(SystemDao dao) {
        this.dao = dao;
    }

    /**
     * @see com.cmc.service.SystemManager#getSystems(com.cmc.model.System)
     */
    public List getSystems(final System system) {
        return dao.getSystems(system);
    }

    /**
     * @see com.cmc.service.SystemManager#getSystem(String id)
     */
    public System getSystem(final String id) {
        return dao.getSystem(new Long(id));
    }

    /**
     * @see com.cmc.service.SystemManager#saveSystem(System system)
     */
    public void saveSystem(System system) {
        dao.saveSystem(system);
    }

    /**
     * @see com.cmc.service.SystemManager#removeSystem(String id)
     */
    public void removeSystem(final String id) {
        dao.removeSystem(new Long(id));
    }
}
